package com.gcd.gym.service.impl;

import com.gcd.gym.mapper.ChartMapper;
import com.gcd.gym.model.chart.CourseGrading;
import com.gcd.gym.model.chart.CourseHot;
import com.gcd.gym.service.ChartService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.LinkedHashMap;
import java.util.List;

@Service
public class ChartServiceImpl implements ChartService {
    private ChartMapper chartMapper;

    @Autowired
    public void setChartMapper(ChartMapper chartMapper) {
        this.chartMapper = chartMapper;
    }

    //    查询热门课程
    @Override
    public List<CourseHot> courseHotChart() {
        return chartMapper.courseHotChart();
    }
    //    课程评分统计
    @Override
    public List<CourseGrading> courseGrading() {
        return chartMapper.courseGrading();
    }
}
